package org.liululu;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class log4jDemo {
	public static void main(String[] args) {
//		PropertyConfigurator.configure("resources/log4j.properties");
		PropertyConfigurator.configure("log4j.properties");
		Logger logger = Logger.getLogger(log4jDemo.class);
		FileReader fr = null;
		try {
			fr = new FileReader("info.txt");
//			System.out.println(System.getProperty("user.dir"));
			logger.info(" begin read file");
			logger.info(" begin read fisdfdsfle");
		} catch (FileNotFoundException e) {
			logger.error("file not found", e);
			try {
				fr.close();
			} catch (IOException e1) {

				logger.error("file not found", e1);
			}
		}
	}
}
